package com.eazy.lksy.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.eazy.lksy.common.BaseDao;
import com.eazy.lksy.model.Log;

@Repository
public class LogDao extends BaseDao {

	public List<Map<String, Object>> selectLog() {
		String sql = "select * from log order by CREATE_DATE desc ";
		return dao.queryForList(sql);
	}
	
	public void save(Log log) {
		String sql = "insert into log(OS,BROWSER,IP,CREATE_DATE) values(?,?,?,?)";
		dao.update(sql, log.getOs(),log.getBrowser(),log.getIp(),log.getCreateDate());
	}
}
